package com.white.loggerserver

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.white.loggerserver.R

/**
 * Created by ytf on 2020/07/23.
 * Description:
 */
class LogRuntimeAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_log_runtime) {

    override fun convert(holder: BaseViewHolder, item: String) {
        var str = item
        if(str.endsWith('\n')){
            str = str.substring(0, str.length-1)
        }
        holder.setText(R.id.item, str)
    }
}